/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ui.gui.actions;

import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.JFrame;
import ui.gui.dialogs.NewRelation;

/**
 *
 * @author stephane
 */

public class NewRelationAction extends AbstractAction
{
    private static final long serialVersionUID = 1L;
    private JFrame _parent = null;
    public NewRelationAction(JFrame parent)
    {
        super("Create new relation ...", new javax.swing.ImageIcon(NewRelationAction.class.getResource("/resources/workspaceIcon.png")));
        putValue(SHORT_DESCRIPTION, "Create a new relation with current model."); 
        this._parent = parent;
    }
    
    @Override
    public void actionPerformed(ActionEvent e) {
        new NewRelation(this._parent, true).setVisible(true);
    }
    
}